package cn.bookCity.util;

import javax.servlet.http.Cookie;

public class CookUtils {
	
	/**
	 * 通过名称获取cookie
	 */
	public static Cookie getCookieByName(String name,Cookie[] cookies) {
		if(cookies!=null) {
			for(Cookie c:cookies) {
				if(c.getName().equals(name)) {
					return c;
				}
			}
		}
		return null;
	}

}
